From 7d94831fe638ac047d678b40860517138d34e151 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sat, 3 Oct 2015 00:19:39 +0200 Subject: [PATCH] Add test case for project root located in dotdir --- tests/test_cargo_compile.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/test_cargo_compile.rs b/tests/test_cargo_compile.rs index cd1714c18..ebef666bf 100644 --- a/tests/test_cargo_compile.rs +++ b/tests/test_cargo_compile.rs @@ -7,7 +7,7 @@ use tempdir::TempDir; use support::{project, execs, main_file, basic_bin_manifest}; use support::{COMPILING, RUNNING, ProjectBuilder}; use hamcrest::{assert_that, existing_file, is_not}; -use support::paths::CargoPathExt; +use support::paths::{CargoPathExt,root}; use cargo::util::process; fn setup() { @@ -1868,6 +1868,20 @@ test!(ignore_dotdirs { execs().with_status(0)); }); +test!(dotdir_root { + let p = ProjectBuilder::new("foo", root().join(".foo")) + .file("Cargo.toml", r#" + [package] + name = "foo" + version = "0.0.1" + authors = [] + "#) + .file("src/bin/a.rs", "fn main() {}"); + p.build(); + assert_that(p.cargo("build"), + execs().with_status(0)); +}); + test!(custom_target_dir { let p = project("foo") -- 2.30.2